3.33 \(\int x (d+i c d x)^4 (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=178 \[ -\frac{d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{6 c^2}+\frac{d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}+\frac{b d^4 (-c x+i)^5}{30 c^2}+\frac{i b d^4 (-c x+i)^4}{30 c^2}-\frac{4 b d^4 (-c x+i)^3}{45 c^2}-\frac{4 i b d^4 (-c x+i)^2}{15 c^2}+\frac{32 i b d^4 \log (c x+i)}{15 c^2}-\frac{16 b d^4 x}{15 c} \]

[Out]

(-16*b*d^4*x)/(15*c) - (((4*I)/15)*b*d^4*(I - c*x)^2)/c^2 - (4*b*d^4*(I - c*x)^3)/(45*c^2) + ((I/30)*b*d^4*(I
- c*x)^4)/c^2 + (b*d^4*(I - c*x)^5)/(30*c^2) + (d^4*(1 + I*c*x)^5*(a + b*ArcTan[c*x]))/(5*c^2) - (d^4*(1 + I*c
*x)^6*(a + b*ArcTan[c*x]))/(6*c^2) + (((32*I)/15)*b*d^4*Log[I + c*x])/c^2

________________________________________________________________________________________

Rubi [A]  time = 0.11255, antiderivative size = 178, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {43, 4872, 12, 77} \[ -\frac{d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{6 c^2}+\frac{d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}+\frac{b d^4 (-c x+i)^5}{30 c^2}+\frac{i b d^4 (-c x+i)^4}{30 c^2}-\frac{4 b d^4 (-c x+i)^3}{45 c^2}-\frac{4 i b d^4 (-c x+i)^2}{15 c^2}+\frac{32 i b d^4 \log (c x+i)}{15 c^2}-\frac{16 b d^4 x}{15 c} \]

Antiderivative was successfully verified.

[In]

Int[x*(d + I*c*d*x)^4*(a + b*ArcTan[c*x]),x]

[Out]

(-16*b*d^4*x)/(15*c) - (((4*I)/15)*b*d^4*(I - c*x)^2)/c^2 - (4*b*d^4*(I - c*x)^3)/(45*c^2) + ((I/30)*b*d^4*(I
- c*x)^4)/c^2 + (b*d^4*(I - c*x)^5)/(30*c^2) + (d^4*(1 + I*c*x)^5*(a + b*ArcTan[c*x]))/(5*c^2) - (d^4*(1 + I*c
*x)^6*(a + b*ArcTan[c*x]))/(6*c^2) + (((32*I)/15)*b*d^4*Log[I + c*x])/c^2

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 4872

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u = I
ntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^2*x^
2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0
]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int x (d+i c d x)^4 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac{d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}-\frac{d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{6 c^2}-(b c) \int \frac{d^4 (i-c x)^4 (i+5 c x)}{30 c^2 (i+c x)} \, dx\\ &=\frac{d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}-\frac{d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{6 c^2}-\frac{\left (b d^4\right ) \int \frac{(i-c x)^4 (i+5 c x)}{i+c x} \, dx}{30 c}\\ &=\frac{d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}-\frac{d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{6 c^2}-\frac{\left (b d^4\right ) \int \left (32+5 (i-c x)^4+16 i (-i+c x)-8 (-i+c x)^2-4 i (-i+c x)^3-\frac{64 i}{i+c x}\right ) \, dx}{30 c}\\ &=-\frac{16 b d^4 x}{15 c}-\frac{4 i b d^4 (i-c x)^2}{15 c^2}-\frac{4 b d^4 (i-c x)^3}{45 c^2}+\frac{i b d^4 (i-c x)^4}{30 c^2}+\frac{b d^4 (i-c x)^5}{30 c^2}+\frac{d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}-\frac{d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{6 c^2}+\frac{32 i b d^4 \log (i+c x)}{15 c^2}\\ \end{align*}

Mathematica [A]  time = 0.101014, size = 264, normalized size = 1.48 \[ \frac{1}{6} a c^4 d^4 x^6-\frac{4}{5} i a c^3 d^4 x^5-\frac{3}{2} a c^2 d^4 x^4+\frac{4}{3} i a c d^4 x^3+\frac{1}{2} a d^4 x^2-\frac{1}{30} b c^3 d^4 x^5+\frac{1}{5} i b c^2 d^4 x^4+\frac{16 i b d^4 \log \left (c^2 x^2+1\right )}{15 c^2}+\frac{1}{6} b c^4 d^4 x^6 \tan ^{-1}(c x)-\frac{4}{5} i b c^3 d^4 x^5 \tan ^{-1}(c x)-\frac{3}{2} b c^2 d^4 x^4 \tan ^{-1}(c x)+\frac{13 b d^4 \tan ^{-1}(c x)}{6 c^2}+\frac{5}{9} b c d^4 x^3+\frac{4}{3} i b c d^4 x^3 \tan ^{-1}(c x)+\frac{1}{2} b d^4 x^2 \tan ^{-1}(c x)-\frac{13 b d^4 x}{6 c}-\frac{16}{15} i b d^4 x^2 \]

Antiderivative was successfully verified.

[In]

Integrate[x*(d + I*c*d*x)^4*(a + b*ArcTan[c*x]),x]

[Out]

(-13*b*d^4*x)/(6*c) + (a*d^4*x^2)/2 - ((16*I)/15)*b*d^4*x^2 + ((4*I)/3)*a*c*d^4*x^3 + (5*b*c*d^4*x^3)/9 - (3*a
*c^2*d^4*x^4)/2 + (I/5)*b*c^2*d^4*x^4 - ((4*I)/5)*a*c^3*d^4*x^5 - (b*c^3*d^4*x^5)/30 + (a*c^4*d^4*x^6)/6 + (13
*b*d^4*ArcTan[c*x])/(6*c^2) + (b*d^4*x^2*ArcTan[c*x])/2 + ((4*I)/3)*b*c*d^4*x^3*ArcTan[c*x] - (3*b*c^2*d^4*x^4
*ArcTan[c*x])/2 - ((4*I)/5)*b*c^3*d^4*x^5*ArcTan[c*x] + (b*c^4*d^4*x^6*ArcTan[c*x])/6 + (((16*I)/15)*b*d^4*Log
[1 + c^2*x^2])/c^2

________________________________________________________________________________________

Maple [A]  time = 0.028, size = 224, normalized size = 1.3 \begin{align*}{\frac{{c}^{4}{d}^{4}a{x}^{6}}{6}}+{\frac{{\frac{16\,i}{15}}{d}^{4}b\ln \left ({c}^{2}{x}^{2}+1 \right ) }{{c}^{2}}}-{\frac{3\,{c}^{2}{d}^{4}a{x}^{4}}{2}}+{\frac{i}{5}}{c}^{2}{d}^{4}b{x}^{4}+{\frac{{d}^{4}a{x}^{2}}{2}}+{\frac{{c}^{4}{d}^{4}b\arctan \left ( cx \right ){x}^{6}}{6}}-{\frac{4\,i}{5}}{c}^{3}{d}^{4}a{x}^{5}-{\frac{3\,{c}^{2}{d}^{4}b\arctan \left ( cx \right ){x}^{4}}{2}}-{\frac{16\,i}{15}}{d}^{4}b{x}^{2}+{\frac{{d}^{4}b\arctan \left ( cx \right ){x}^{2}}{2}}-{\frac{13\,{d}^{4}bx}{6\,c}}-{\frac{{c}^{3}{d}^{4}b{x}^{5}}{30}}-{\frac{4\,i}{5}}{c}^{3}{d}^{4}b\arctan \left ( cx \right ){x}^{5}+{\frac{5\,c{d}^{4}b{x}^{3}}{9}}+{\frac{4\,i}{3}}c{d}^{4}b\arctan \left ( cx \right ){x}^{3}+{\frac{4\,i}{3}}c{d}^{4}a{x}^{3}+{\frac{13\,b{d}^{4}\arctan \left ( cx \right ) }{6\,{c}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(d+I*c*d*x)^4*(a+b*arctan(c*x)),x)

[Out]

1/6*c^4*d^4*a*x^6+16/15*I/c^2*d^4*b*ln(c^2*x^2+1)-3/2*c^2*d^4*a*x^4+1/5*I*c^2*d^4*b*x^4+1/2*d^4*a*x^2+1/6*c^4*
d^4*b*arctan(c*x)*x^6-4/5*I*c^3*d^4*a*x^5-3/2*c^2*d^4*b*arctan(c*x)*x^4-16/15*I*d^4*b*x^2+1/2*d^4*b*arctan(c*x
)*x^2-13/6*b*d^4*x/c-1/30*c^3*d^4*b*x^5-4/5*I*c^3*d^4*b*arctan(c*x)*x^5+5/9*c*d^4*b*x^3+4/3*I*c*d^4*b*arctan(c
*x)*x^3+4/3*I*c*d^4*a*x^3+13/6/c^2*d^4*b*arctan(c*x)

________________________________________________________________________________________

Maxima [B]  time = 1.50462, size = 392, normalized size = 2.2 \begin{align*} \frac{1}{6} \, a c^{4} d^{4} x^{6} - \frac{4}{5} i \, a c^{3} d^{4} x^{5} - \frac{3}{2} \, a c^{2} d^{4} x^{4} + \frac{1}{90} \,{\left (15 \, x^{6} \arctan \left (c x\right ) - c{\left (\frac{3 \, c^{4} x^{5} - 5 \, c^{2} x^{3} + 15 \, x}{c^{6}} - \frac{15 \, \arctan \left (c x\right )}{c^{7}}\right )}\right )} b c^{4} d^{4} - \frac{1}{5} i \,{\left (4 \, x^{5} \arctan \left (c x\right ) - c{\left (\frac{c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac{2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b c^{3} d^{4} + \frac{4}{3} i \, a c d^{4} x^{3} - \frac{1}{2} \,{\left (3 \, x^{4} \arctan \left (c x\right ) - c{\left (\frac{c^{2} x^{3} - 3 \, x}{c^{4}} + \frac{3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c^{2} d^{4} + \frac{2}{3} i \,{\left (2 \, x^{3} \arctan \left (c x\right ) - c{\left (\frac{x^{2}}{c^{2}} - \frac{\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b c d^{4} + \frac{1}{2} \, a d^{4} x^{2} + \frac{1}{2} \,{\left (x^{2} \arctan \left (c x\right ) - c{\left (\frac{x}{c^{2}} - \frac{\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d^{4} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)^4*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/6*a*c^4*d^4*x^6 - 4/5*I*a*c^3*d^4*x^5 - 3/2*a*c^2*d^4*x^4 + 1/90*(15*x^6*arctan(c*x) - c*((3*c^4*x^5 - 5*c^2
*x^3 + 15*x)/c^6 - 15*arctan(c*x)/c^7))*b*c^4*d^4 - 1/5*I*(4*x^5*arctan(c*x) - c*((c^2*x^4 - 2*x^2)/c^4 + 2*lo
g(c^2*x^2 + 1)/c^6))*b*c^3*d^4 + 4/3*I*a*c*d^4*x^3 - 1/2*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3*x)/c^4 + 3*arcta
n(c*x)/c^5))*b*c^2*d^4 + 2/3*I*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*c*d^4 + 1/2*a*d^4*x^
2 + 1/2*(x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*d^4

________________________________________________________________________________________

Fricas [A]  time = 2.83865, size = 491, normalized size = 2.76 \begin{align*} \frac{30 \, a c^{6} d^{4} x^{6} +{\left (-144 i \, a - 6 \, b\right )} c^{5} d^{4} x^{5} - 18 \,{\left (15 \, a - 2 i \, b\right )} c^{4} d^{4} x^{4} +{\left (240 i \, a + 100 \, b\right )} c^{3} d^{4} x^{3} + 6 \,{\left (15 \, a - 32 i \, b\right )} c^{2} d^{4} x^{2} - 390 \, b c d^{4} x + 387 i \, b d^{4} \log \left (\frac{c x + i}{c}\right ) - 3 i \, b d^{4} \log \left (\frac{c x - i}{c}\right ) +{\left (15 i \, b c^{6} d^{4} x^{6} + 72 \, b c^{5} d^{4} x^{5} - 135 i \, b c^{4} d^{4} x^{4} - 120 \, b c^{3} d^{4} x^{3} + 45 i \, b c^{2} d^{4} x^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{180 \, c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)^4*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/180*(30*a*c^6*d^4*x^6 + (-144*I*a - 6*b)*c^5*d^4*x^5 - 18*(15*a - 2*I*b)*c^4*d^4*x^4 + (240*I*a + 100*b)*c^3
*d^4*x^3 + 6*(15*a - 32*I*b)*c^2*d^4*x^2 - 390*b*c*d^4*x + 387*I*b*d^4*log((c*x + I)/c) - 3*I*b*d^4*log((c*x -
 I)/c) + (15*I*b*c^6*d^4*x^6 + 72*b*c^5*d^4*x^5 - 135*I*b*c^4*d^4*x^4 - 120*b*c^3*d^4*x^3 + 45*I*b*c^2*d^4*x^2
)*log(-(c*x + I)/(c*x - I)))/c^2

________________________________________________________________________________________

Sympy [B]  time = 4.05707, size = 328, normalized size = 1.84 \begin{align*} \frac{a c^{4} d^{4} x^{6}}{6} - \frac{13 b d^{4} x}{6 c} - \frac{i b d^{4} \log{\left (x - \frac{i}{c} \right )}}{60 c^{2}} + \frac{43 i b d^{4} \log{\left (x + \frac{i}{c} \right )}}{20 c^{2}} + x^{5} \left (- \frac{4 i a c^{3} d^{4}}{5} - \frac{b c^{3} d^{4}}{30}\right ) + x^{4} \left (- \frac{3 a c^{2} d^{4}}{2} + \frac{i b c^{2} d^{4}}{5}\right ) + x^{3} \left (\frac{4 i a c d^{4}}{3} + \frac{5 b c d^{4}}{9}\right ) + x^{2} \left (\frac{a d^{4}}{2} - \frac{16 i b d^{4}}{15}\right ) + \left (- \frac{i b c^{4} d^{4} x^{6}}{12} - \frac{2 b c^{3} d^{4} x^{5}}{5} + \frac{3 i b c^{2} d^{4} x^{4}}{4} + \frac{2 b c d^{4} x^{3}}{3} - \frac{i b d^{4} x^{2}}{4}\right ) \log{\left (i c x + 1 \right )} + \left (\frac{i b c^{4} d^{4} x^{6}}{12} + \frac{2 b c^{3} d^{4} x^{5}}{5} - \frac{3 i b c^{2} d^{4} x^{4}}{4} - \frac{2 b c d^{4} x^{3}}{3} + \frac{i b d^{4} x^{2}}{4}\right ) \log{\left (- i c x + 1 \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)**4*(a+b*atan(c*x)),x)

[Out]

a*c**4*d**4*x**6/6 - 13*b*d**4*x/(6*c) - I*b*d**4*log(x - I/c)/(60*c**2) + 43*I*b*d**4*log(x + I/c)/(20*c**2)
+ x**5*(-4*I*a*c**3*d**4/5 - b*c**3*d**4/30) + x**4*(-3*a*c**2*d**4/2 + I*b*c**2*d**4/5) + x**3*(4*I*a*c*d**4/
3 + 5*b*c*d**4/9) + x**2*(a*d**4/2 - 16*I*b*d**4/15) + (-I*b*c**4*d**4*x**6/12 - 2*b*c**3*d**4*x**5/5 + 3*I*b*
c**2*d**4*x**4/4 + 2*b*c*d**4*x**3/3 - I*b*d**4*x**2/4)*log(I*c*x + 1) + (I*b*c**4*d**4*x**6/12 + 2*b*c**3*d**
4*x**5/5 - 3*I*b*c**2*d**4*x**4/4 - 2*b*c*d**4*x**3/3 + I*b*d**4*x**2/4)*log(-I*c*x + 1)

________________________________________________________________________________________

Giac [A]  time = 1.1696, size = 320, normalized size = 1.8 \begin{align*} \frac{30 \, b c^{6} d^{4} x^{6} \arctan \left (c x\right ) + 30 \, a c^{6} d^{4} x^{6} - 144 \, b c^{5} d^{4} i x^{5} \arctan \left (c x\right ) - 144 \, a c^{5} d^{4} i x^{5} - 6 \, b c^{5} d^{4} x^{5} + 36 \, b c^{4} d^{4} i x^{4} - 270 \, b c^{4} d^{4} x^{4} \arctan \left (c x\right ) - 270 \, a c^{4} d^{4} x^{4} + 240 \, b c^{3} d^{4} i x^{3} \arctan \left (c x\right ) + 240 \, a c^{3} d^{4} i x^{3} + 100 \, b c^{3} d^{4} x^{3} - 192 \, b c^{2} d^{4} i x^{2} + 90 \, b c^{2} d^{4} x^{2} \arctan \left (c x\right ) + 90 \, a c^{2} d^{4} x^{2} - 390 \, b c d^{4} x + 387 \, b d^{4} i \log \left (c i x - 1\right ) - 3 \, b d^{4} i \log \left (-c i x - 1\right )}{180 \, c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)^4*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

1/180*(30*b*c^6*d^4*x^6*arctan(c*x) + 30*a*c^6*d^4*x^6 - 144*b*c^5*d^4*i*x^5*arctan(c*x) - 144*a*c^5*d^4*i*x^5
 - 6*b*c^5*d^4*x^5 + 36*b*c^4*d^4*i*x^4 - 270*b*c^4*d^4*x^4*arctan(c*x) - 270*a*c^4*d^4*x^4 + 240*b*c^3*d^4*i*
x^3*arctan(c*x) + 240*a*c^3*d^4*i*x^3 + 100*b*c^3*d^4*x^3 - 192*b*c^2*d^4*i*x^2 + 90*b*c^2*d^4*x^2*arctan(c*x)
 + 90*a*c^2*d^4*x^2 - 390*b*c*d^4*x + 387*b*d^4*i*log(c*i*x - 1) - 3*b*d^4*i*log(-c*i*x - 1))/c^2